<div id="sidebar">
	<ul>
<?php /* FUNCTION FOR WIDGETS */ if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
		<li id="blog-search">
			<h2><label for="s">Search</label></h2>
			<?php include (TEMPLATEPATH . '/searchform.php'); ?>
		</li>
		<?php wp_list_pages('title_li=<h2>Contents</h2>' ); ?>
		<li id="category-links">
			<h2>Categories</h2>
			<ul> 
				<?php wp_list_cats('sort_column=name&hierarchical=1'); ?>
			</ul>
		</li>
		<li id="archive-links">
			<h2>Archives</h2>
			<ul>
				<?php wp_get_archives('type=monthly'); ?>
			</ul>
		</li>
<?php if ( is_home() || is_page() ) { ?>
		<?php get_links_list('id-'); ?>
		<li id="feed-links">
			<h2>RSS (XML) Feeds</h2>
			<ul>
				<li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php bloginfo('name'); ?> RSS 2.0 (XML)" rel="alternate" type="application/rss+xml">Entries RSS 2.0</a></li>
				<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php bloginfo('name'); ?> Comments RSS 2.0 (XML)" rel="alternate" type="application/rss+xml">Comments RSS 2.0</a></li>
			</ul>
		</li>
		<li id="meta-links">
			<h2>Meta</h2>
			<ul>
				<?php wp_register(); ?>
				<li><?php wp_loginout(); ?></li>
				<li><a href="http://wordpress.org/" title="Powered by WordPress">WordPress</a></li>
				<?php wp_meta(); ?>
			</ul>
		</li>
<?php } ?>
<?php endif; /* END FOR WIDGETS CALL */ ?>
	</ul>
</div><!-- END SIDEBAR -->